In a packet communication network, routers receive packets through one of a set of input interfaces and forward them on through one of a set of output interfaces. Routing decisions are made on the basis of information in the packet header, which typically includes the destination address and source address of the packet, along with other information, such as the destination and source device ports, transport protocol, packet length, and priority. The form and contents of the packet header and the manner in which routing decision are made based on the packet header are specified by the network-layer protocol that is used in the network. The most common network-layer protocol is the Internet Protocol (IP), and in particular IP Version 4 (IPv4).
IP Version 6 (IPv6) is a network-layer protocol for packet-switched internetworking, which provides end-to-end datagram transmission across multiple IP networks. IPv6 follows the design principles developed in IPv4 but includes additional features that require more sophisticated handling by routers. IPv6 is formally defined in Internet Engineering Task Force (IETF) Request for Comments (RFC) 2460, published in December, 1998.
IPv6 specifies a header format that includes a mandatory basic header and multiple optional extension headers. The basic header (sometimes referred to as the “fixed header”) occupies the first 40 octets (320 bits) of the IPv6 packet and contains the source and destination addresses, traffic classification options, a hop counter, and the type of the extension header or payload that follows the header. The extension headers carry options that are used for special treatment of a packet in the network, for example for purposes of routing control, fragmentation, and security protocols. The IPv6 header (including any extension headers) is most commonly followed by a transport-layer protocol header and payload data, for example under the Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). Alternatively, the IPv6 header can be followed by headers and payloads in accordance with other sorts of protocols, such as the Internet Control Message Protocol (ICMP). The headers following the IP basic header and extension headers are referred to generically as “upper-layer” headers.
The IPv6 header and each of the extension headers contains a “Next Header” field, which identifies the type of header that follows and thus links the headers together in a chain. The Next Header field in the basic header indicates the type of the first extension header. The Next Header field of the last extension header indicates the type of the upper-layer protocol header, for example the transport-layer protocol header. The Next Header fields in the intermediate extension headers each point to the next one in the chain. The number of extension headers may vary from packet to packet, and the sizes of the extension headers may vary (though all are required to be a multiple of eight octets).